import {
	apiResquest
} from './http.js'

// 话题列表
export const TopicList = () => {
	return apiResquest({
		url: 'mini/topic/listget',
		method: 'get',
	})
}
export const PostAdd = (params) => {
	return apiResquest({
		url: 'mini/company/adds',
		method: 'post',
		data: params
	})
}
export const PostList = (params) => {
	return apiResquest({
		url: 'mini/company/list',
		method: 'get',
		data: params
	})
}
export const PostDetail = (id) => {
	return apiResquest({
		url: 'mini/company/' + id,
		method: 'get'
	})
}
// 评论列表
export const PostComment = (id) => {
	return apiResquest({
		url: 'mini/evaluate/list',
		method: 'get',
		data: {
			companyId: id
		}
	})
}
// 接口功能：发表评论
// 接口路径：/mini/evaluate/add
// 参数：companyId 公司id，state 评价类型  0 点赞  1 评论， itContent 评论内容，repliedBy 被评论id
export const PostCommentZan = (params) => {
	return apiResquest({
		url: 'mini/evaluate/adds',
		method: 'post',
		data: params
	})
}

